Skip to content

feat(spec)!: retire the ask_ai action type (ADR-0160 D7) - #37924

Draft
objectstack-fleet[bot] wants to merge 11 commits into
mainfrom
claude/project-thread-vjrz36
Draft

objectstack-fleet[bot] wants to merge 11 commits into
mainfrom
claude/project-thread-vjrz36

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Fixes #37856
Fixes #37827

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37857

维护者速读

  • 作者和终端用户:记录页、列表行、仪表盘上不再有「问 AI」动作按钮,进入助手只走页头的「问 AI」入口,它自动带上当前记录。
  • 属于「问 AI」入口专题:按维护者裁定,在 19.0.0 正式版之前撤掉只在预发布版出现过的这个动作类型。
  • 已写了这种动作的作者会在校验时看到一句处方;升级命令能删的自动删,被引用的留给作者手删;库里已存的这种动作直接不显示,可按名删除。正式版前撤回本 PR 即可恢复。
  • 要你做什么:技能文档那张卡(删掉技能里教作者加问 AI 按钮的内容)需先于本 PR 合入,否则本 PR 的技能示例检查保持红。

What changes

ADR-0160 D7, seventh amendment: ask_ai leaves ActionType before 19.0.0 with no compatibility shim. It was published only on 19.0.0-next.0.

  • Refusal with one prescription (packages/spec/src/ui/action-ask-ai-retired.ts, not barrel-exported) in every slot that takes an action type: ActionType (now enumWithRetiredValues, so the dashboard header's derived actionType refuses it too), a declared or inline action's type, actionType on action:button / action:icon rows, and type on action:group / action:menu members.
  • ADR-0087 kit: D2 conversion action-type-ask-ai-removed (retired from the load path, retiredAfter: '18.6.0') and D3 entry ui-action-type-ask-ai-retired. ConversionContext.atRest tells the two doors apart:
    • over sources (os migrate meta --from 18) a declared ask_ai action is deleted only when no string anywhere else in the stack names it; a named one stays as written with every reference, and is reported as a todo. The conversion never deletes a reference.
    • at rest (stored rows, built artifacts) every ask_ai action, row and member is deleted.
  • Stored seam answers "no item": applyConversionsToStoredItem returns undefined when the chain leaves nothing of a row. Its callers in metadata-protocol (overlay reads, list drafts, registry hydration, diff load, package duplicate/import), metadata (DatabaseLoader), core (authored translation sync) and service-datasource serve and register nothing for such a row. DatabaseLoader still reads a row's identity (name, object binding) from the stored body, so the delete door reaches it. migrateStoredMetadata lists it skipped with DELETE /api/v1/meta/action/<name> instead of re-saving it.
  • Removed with the type (revert of b7dee0e, adapted): ActionRunner's ask_ai executor and setAssistantFocusHandler / drawsAction / isAskAiAction; <ActionProvider onAskAi> and useDrawsAction(); the renderers' drawn-action gates; useAskAiHandler; setChatFocus and its hosts. The conversation pin from conversation focus: a pinned record in the chat request, shown as a chip, kept across navigation #36999 stays, set from the composer chip only. Record page hides every type: 'ask_ai' action: RecordDetailView's own ActionProvider drops the shell's onAskAi #37827 (the record page dropping the handler) closes because the handler is gone.
  • ActionType's live members are now the non-exported ACTION_TYPE_VALUES array it wraps. scripts/check-skill-identifier-liveness.mjs binds the ### Action Types table to it (the SeedMode precedent). This one gate file is outside the claim's file surface; it is the only way that gate can read the enum now.

Tests

  • packages/spec/src/ui/action-ask-ai-retired.test.ts: the refusal and its path in each slot, with live-type controls.
  • packages/spec/src/conversions/action-type-ask-ai-removed.test.ts: source keeps the named action and deletes the unnamed one, lists the D3 entry, reports the todo; at rest deletes both; idempotent; stored seam answers undefined for an ask_ai action row and strips only the action from an object row.
  • packages/spec/src/shared/retired-key-removal-version.pin.test.ts: the conversion joined to its prescriptions (names 19.0.0 and --from 18).
  • packages/metadata/src/loaders/database-loader-ask-ai-retired-row.test.ts (real SQLite): load serves nothing, exists and delete reach the row, and a same-name write keeps the two object bindings apart. Ablation: reading identity through the converted body turns the last case red.
  • packages/metadata-protocol/src/protocol.stored-ask-ai-retired-row.test.ts: the stored pass lists the row skipped with the delete door, an apply run writes nothing, the list read serves only the live row. Ablation: removing the skip branch turns two cases red.

Acceptance notes

  • Landing order: check:skill-examples is red on this branch with one error, skills/objectstack-ai/SKILL.md:188:3 TS2322 ('ask_ai' not in ActionType). C1s 入口专题 C1s:技能文档与评测样例里的 ask_ai 删掉(受管 skills) #37857 removes that teaching and compiles against current main, so it lands first. That thread has been told.
  • Baselines: check:api-surface, check:authorable-surface and check:generated are green with no baseline file changed. The reference pages under content/docs/references/ are regenerated (the enum lists lose ask_ai).
  • git grep -n ask_ai outside skills/**, docs/adr/**, .changeset/pre/ and the CHANGELOGs leaves only the prescription and its two schema call sites, the conversion and its semantic entry, and their tests. The Studio canvas strings (designer.canvas.askAi*) are untouched.
  • .changeset/pre/37142-ask-ai-action-type.md and the setChatFocus line of .changeset/pre/36999-conversation-focus.md are left as written. This PR's changeset carries the correction. Whether the prerelease texts themselves change is for the release owner.
  • brightrule declares brightrule_policy_ask (type: 'ask_ai') and has to drop it before it moves to a build with this change. It was not booted here.

Verification

Readings
  • spec: vitest run full package 976 files / 29,727 tests, 1 red before the pin join (fixed, 68/68 after); src/ui src/conversions src/migrations 224 files / 7,701 tests green.
  • typecheck green: spec (tsc + check:test-typecheck), metadata, metadata-protocol, core (+ test typecheck), runtime (+ test typecheck), service-datasource, @object-ui/core, react, components, plugin-grid, plugin-detail, app-shell.
  • metadata database-loader.test.ts + new file: 502 green. metadata-protocol new file: 3 green.
  • dispatch-gates.mjs --commands: 128 commands run. Red found and fixed: check:generated / check:test-typecheck (stored seam's undefined in 4 existing tests), check:skill-identifier-liveness, check:engine-double-contract (ledger --write), check:objectql-double-limit, check:test-source-alias. Prerequisites cleared: check:published-readme-exports, check-plugin-teardown-shape --self-test. Still red: check:skill-examples (order above).
  • dogfood battery: owed on the final head.

Two-minute check: pnpm --filter @objectstack/spec exec vitest run src/ui/action-ask-ai-retired.test.ts src/conversions/action-type-ask-ai-removed.test.ts. Expect 2 files green.


🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK

…he read, delete and stored-pass doors (#37856)

Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK
Co-authored-by: Claude <noreply@anthropic.com>
…moval-version pin (#37856)

Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK
Co-authored-by: Claude <noreply@anthropic.com>
…und the new engine double (#37856)

Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation protocol:data protocol:ui tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 6 package(s): @objectstack/core, @objectstack/metadata-protocol, @objectstack/metadata, @objectstack/runtime, @objectstack/service-datasource, @objectstack/spec, touching 70 documentable anchor(s).

20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json bc173343ea57fb854994a9d59e9145a52656f8e9.

⛔ 14 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: /api/v1/meta (route, 55 pages)
  • 7 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 189 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json bc173343ea57fb854994a9d59e9145a52656f8e9 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 27f927fbc6dfc597e3275bf344789fee9cb5d7be — the merge of head 8bfa49aef9aca369ac6a3d22c3628d66885d3a0e into base bc173343ea57fb854994a9d59e9145a52656f8e9, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 27f927fbc6dfc597e3275bf344789fee9cb5d7be && git checkout 27f927fbc6dfc597e3275bf344789fee9cb5d7be
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bc173343ea57fb854994a9d59e9145a52656f8e9 8bfa49aef9aca369ac6a3d22c3628d66885d3a0e && git checkout -B drift-repro bc173343ea57fb854994a9d59e9145a52656f8e9 && git merge --no-ff 8bfa49aef9aca369ac6a3d22c3628d66885d3a0e

node scripts/docs-audit/affected-docs.mjs --json bc173343ea57fb854994a9d59e9145a52656f8e9

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs bc173343ea57fb854994a9d59e9145a52656f8e9 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…sts that read a converted row (#37856)

Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i

L1-c, the seat's L1 thread · 2026-11-27T12:45Z — the brief handed to the isolated contract reviewer whose record follows, posted for the seat to read before adopting it.

Contract review brief — PR #37924 @ a2dd88a68cbb2efa6145ad4b2cdf9100ba802e28 (card #37856)

You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face narrowing — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #37856: its body and EVERY comment (rulings and earlier records included)
· PR #37924: its body, its file list, and the net diff against main at a2dd88a68cbb2efa6145ad4b2cdf9100ba802e28
· the check-runs on a2dd88a68cbb2efa6145ad4b2cdf9100ba802e28: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the narrowing is declared of the whole PR, never of a path: the floor is EVERY path of the diff outside the
prose faces (the 83 paths listed in SCRATCHPAD/pr-37924/scope-paths.txt), plus every file those hunks make a claim about, read in the cited code.
Widen it freely, ⛔ never below that floor; the record's Scope: line lists both. No path is the lane seat's remainder.
④ judges the narrowing itself over that floor: lockfiles, generated output, changesets and prose elsewhere in
the PR are not reviewed; the published spec and the cited code are READ to judge it, never reviewed.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is SCRATCHPAD/pr-37924/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
④ Design judgment — the narrowing itself, read against the published spec on main: does it take a
declared capability away at the consumer, or make the spec's own refusal real? A capability declared
and not delivered is an implementation gap, implemented or retired, ⛔ never narrowed at the consumer.
Read the spec and the cited code in the live tree, and try to break the design.
Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
Spell a must-fix or should-fix with its id and grade, S1 (should-fix) — …, and a clean round as
No must-fix, no should-fix.: the queue guard reads a graded finding as OPEN on this head and
refuses the record; the delta record names those it closes by id alone, S1: closed.
A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
anywhere else moves the head, and this record no longer covers it.
⛔ Judge the tree, never the PR body's account of it.
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a2dd88a68cbb2efa6145ad4b2cdf9100ba802e28
Local-runs: none
Scope: examples/app-showcase/src/system/translations/index.ts, examples/app-showcase/src/ui/actions/index.ts, examples/app-showcase/src/ui/pages/task-detail.page.ts, packages/core/src/fallbacks/authored-translation-sync.ts, packages/drivers/driver-sql/src/sql-driver-unique-tenancy.test.ts, packages/metadata-protocol/src/protocol-diff-delete-load.ts, packages/metadata-protocol/src/protocol-meta-list-reads.ts, packages/metadata-protocol/src/protocol-package-commits.ts, packages/metadata-protocol/src/protocol-registry-hydration.ts, packages/metadata-protocol/src/protocol-save.ts, packages/metadata-protocol/src/protocol-stored-overlay-reads.ts, packages/metadata-protocol/src/protocol.stored-ask-ai-retired-row.test.ts, packages/metadata/src/loaders/database-loader-ask-ai-retired-row.test.ts, packages/metadata/src/loaders/database-loader.ts, packages/runtime/src/action-ask-ai-headless.test.ts, packages/runtime/src/action-execution.ts, packages/services/service-datasource/src/datasource-admin-plugin.ts, packages/spec/src/conversions/action-type-ask-ai-removed.test.ts, packages/spec/src/conversions/apply.ts, packages/spec/src/conversions/conversions.test.ts, packages/spec/src/conversions/entries/19/action-type-ask-ai-removed.ts, packages/spec/src/conversions/registry.ts, packages/spec/src/conversions/stored.test.ts, packages/spec/src/conversions/stored.ts, packages/spec/src/conversions/types.ts, packages/spec/src/conversions/walk.ts, packages/spec/src/data/currency-precision-iso4217.test.ts, packages/spec/src/migrations/entries/semantic/19.ui-action-type-ask-ai-retired.ts, packages/spec/src/shared/retired-key-removal-version.pin.test.ts, packages/spec/src/ui/action-ask-ai-retired.test.ts, packages/spec/src/ui/action-ask-ai-retired.ts, packages/spec/src/ui/action-ask-ai.test.ts, packages/spec/src/ui/action-row-update.test.ts, packages/spec/src/ui/action-undoable-fulfillment.test.ts, packages/spec/src/ui/action.zod.ts, packages/spec/src/ui/component.zod.ts, packages/spec/src/ui/dashboard-header-ask-ai-37142.test.ts, packages/spec/src/ui/dashboard.zod.ts, packages/spec/src/ui/form-layout-inline-grid-retired.test.ts, packages/spec/src/ui/inline-action.test.ts, scripts/check-skill-identifier-liveness.mjs, scripts/engine-double-contract.pinned.json, ui/packages/app-shell/src/console/ConsoleShell.tsx, ui/packages/app-shell/src/console/tests/RequireAiSurface.test.tsx, ui/packages/app-shell/src/hooks/tests/useAiSurface.test.ts, ui/packages/app-shell/src/hooks/tests/useAskAiHandler-37142.test.tsx, ui/packages/app-shell/src/hooks/aiApiBase.ts, ui/packages/app-shell/src/hooks/surfaceAgent.ts, ui/packages/app-shell/src/hooks/useAiSurface.ts, ui/packages/app-shell/src/hooks/useAskAiHandler.ts, ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx, ui/packages/app-shell/src/index.ts, ui/packages/app-shell/src/layout/ChatDockConversation.tsx, ui/packages/app-shell/src/layout/tests/chatFocus-36999.test.tsx, ui/packages/app-shell/src/layout/chatFocus.ts, ui/packages/app-shell/src/views/DeclaredActionsBar.tsx, ui/packages/app-shell/src/views/tests/DeclaredActionsBar.askAi-37142.test.tsx, ui/packages/app-shell/src/views/tests/objectViewHeaderLaunchGate.askAi-37142.test.tsx, ui/packages/app-shell/src/views/metadata-admin/inspectors/ActionDefaultInspector.typeSwitch-26736.test.tsx, ui/packages/app-shell/src/views/metadata-admin/previews/ObjectFormCanvas.test.tsx, ui/packages/app-shell/src/views/objectViewHeaderLaunchGate.tsx, ui/packages/app-shell/src/views/studio-design/ObjectActionsPanel.presets-11861.test.tsx, ui/packages/components/src/renderers/action/action-bar.tsx, ui/packages/components/src/renderers/action/action-button.tsx, ui/packages/components/src/renderers/action/action-group.tsx, ui/packages/components/src/renderers/action/action-icon.tsx, ui/packages/components/src/renderers/action/action-menu.tsx, ui/packages/components/src/renderers/basic/elements.tsx, ui/packages/components/src/renderers/complex/data-table.tsx, ui/packages/components/src/renderers/layout/containers.tsx, ui/packages/core/src/actions/ActionEngine.ts, ui/packages/core/src/actions/ActionRunner.ts, ui/packages/core/src/actions/tests/ActionRunner.askAi-37142.test.ts, ui/packages/layout/src/tests/page-header-subtitle-conversion-coverage.test.ts, ui/packages/plugin-detail/src/RelatedList.tsx, ui/packages/plugin-detail/src/tests/RelatedList.toolbarAskAi-37142.test.tsx, ui/packages/plugin-grid/src/ObjectGrid.tsx, ui/packages/plugin-grid/src/tests/BulkActionBar.askAi-37142.test.tsx, ui/packages/plugin-grid/src/components/BulkActionBar.tsx, ui/packages/plugin-grid/src/components/RowActionMenu.tsx, ui/packages/plugin-grid/src/objectGridActionsColumn.tsx, ui/packages/react/src/context/ActionContext.tsx, ui/packages/react/src/context/tests/ActionProvider.askAi-37142.test.tsx + docs/adr/0160-record-scoped-ai-inquiry.md (D7, seventh amendment, points 29-31), packages/spec/src/shared/retired-key.ts, packages/spec/src/migrations/chain.ts, packages/cli/src/commands/migrate/meta.ts, packages/metadata-core/src/artifact-forward-conversion.ts, packages/lint/src/validate-action-name-refs.ts, packages/metadata-protocol/src/protocol-stored-item-conversion.ts, packages/metadata-protocol/src/protocol-meta-item-reads.ts, packages/metadata-protocol/src/protocol-meta-layered-reads.ts, packages/metadata-protocol/src/protocol-stored-collection-fold.ts, packages/metadata-protocol/src/protocol-class-head.ts, packages/metadata-protocol/src/protocol-package-bindings.ts, packages/metadata-protocol/src/protocol-view-normalization.ts, packages/metadata-protocol/src/protocol-exact-qualifier.ts, packages/metadata-protocol/src/item-lock.ts, packages/objectql/src/plugin.ts, skills/objectstack-ui/SKILL.md, skills/objectstack-ai/SKILL.md, AGENTS.md (release checklist item 3), .changeset/37856-ask-ai-action-type-retired.md (read for ②)

Read: card #37856 body and its 3 comments, #37827 body and its 4 comments, the PR body, the net diff origin/main...a2dd88a6 (91 files), and the check-runs on the head. The ui/** removals were read for completeness, the spec and stored-seam paths line by line.

① Derived judgments

  • Accept-set, ActionType: ask_ai leaves the members; enumWithRetiredValues answers it with the prescription. Right: ADR-0160 D7 "One prescription, on the enum". ActionType.options is now the six live members, so TARGET_REQUIRED_TYPES and ROW_BUILTIN_EXECUTORS lose ask_ai with it. Right.
  • Accept-set, an action's own type (actionObject, which ActionSchema and InlineActionSchema both build on): the second enum answers ask_ai with the same sentence. Right (ADR point 29).
  • Accept-set, page action rows: refuseRowRetiredAskAi on actionType of action:button / action:icon and on type of action:group / action:menu members. On main these open strings accepted ask_ai; now refused. Right (ADR point 29). This is the real narrowing beside the enum.
  • Dashboard header actionType: main already refused ask_ai there (refuseRecordlessAskAi); the PR swaps that refusal for the enum's prescription. No accept-set change, the message changes. Right. WidgetActionTypeSchema has no other user, so no dashboard conversion is owed.
  • Removed refinements: refuseAskAiContradictions on ActionSchema and InlineActionSchema, TARGETLESS_TYPES. They judged only an ask_ai action, which no longer parses. Right.
  • Public surface, spec: applyConversionsToStoredItem returns T | undefined (a widened return type on a root export); ConversionContext gains optional atRest; removePageComponents is new in walk.ts; ACTION_TYPE_VALUES and ASK_AI_RETIRED are not exported. Right, and the changeset names the first two.
  • Conversion action-type-ask-ai-removed (major 19, retiredFromLoadPath, retiredAfter: '18.6.0'): matches D7 "The ADR-0087 kit". The two doors are told apart as D7 leaves to this card: applyMetaMigrations calls conversion.apply with no context, so atRest is unset over sources and the name guard runs; applyConversions sets atRest exactly when includeRetired is set, which only the stored seam, the artifact door and the fixture CI pass (flow replay passes it too and this entry walks no flow). Right. The guard collects every string value outside the ask_ai entries, a superset of the exact-name references ACTION_NAME_UNDEFINED walks. Right, and conservative.
  • Artifact door: out of the diff. Read: a floor of 19.0.0 at a 19.0.0 runtime opens the entry through the major-step half; a floor below the runtime replays the whole chain; a floor past 19.0.0 keeps the strict parse. That is the window D7.3 describes ("every build made during the 19 prerelease"). Right.
  • D3 entry ui-action-type-ask-ai-retired: registered, names the hand edits, carries conversionIds. Right.
  • Stored seam, callers that needed no change: convertStoredItem / convertStoredItemDetailed, withDeclaredPageTypeDefault, withRowBinding, decorateMetadataItem, the stored-collection fold, ObjectQL's readAuthoredActionRows / hook rows, and the active arm of getMetaItem all pass undefined through or skip it. No path registers or dereferences an undefined item. No other registered conversion empties a top-level collection, so no other row type newly answers undefined. Right. Two out-of-diff readers answer wrongly: see S1.
  • DatabaseLoader: rowToData answers null for the row and the type-wide read skips it; identity (slot, member, unnamed-row naming) reads the stored body through rowIdentityData. exists, list and delete work off the name column and the stored body. Holds against the code.
  • migrateStoredMetadata: the item === undefined branch sits after the changed test and before both the preview and the apply arm, records skipped with the delete instruction and writes nothing. Holds.
  • Runtime and ui removals: every removed symbol exists only for ask_ai on main (bulkRefusal included: its one body is isAskAiAction). resolveAiApiBase moves back into useAiSurface.ts, still exported. The three Studio canvas strings stay. Right.
  • Blast radius on main: showcase action, its page reference and its translation key are removed by hand (D7.2 names this case). skills/objectstack-ai teaching and eval: PR docs(skills): objectstack-ai no longer teaches an authored AI button on a record page #37937, which is open and not merged as read. skills/objectstack-ui/SKILL.md:151 and :153: knowingly left, carrier 入口专题 C1s:技能文档与评测样例里的 ask_ai 删掉(受管 skills) #37857. The two .changeset/pre/ notes: left, corrected in this changeset, carrier the release owner. brightrule: carrier its owner. hotcrm and cloud: none per the card; not re-read here.
  • Fixes #37827: correct. That card asked for the record page to draw ask_ai actions; the maintainer's ruling retires the type, the card's own two re-block comments name 入口专题 C1:撤掉 ask_ai 动作类型(enumWithRetiredValues、ADR-0087 三项、只为它存在的导出),19.0 正式版前 #37856 as its closer, card 入口专题 C1:撤掉 ask_ai 动作类型(enumWithRetiredValues、ADR-0087 三项、只为它存在的导出),19.0 正式版前 #37856 step 7 orders it, and the branch holds a claim on it. With the handler gone there is nothing left to fix.

② Semver level

  • Clause-②: no (narrowing) and Metadata-protocol: narrowed stand on both the PR body and the changeset. The kind is right: an accepted value is now refused.
  • Level: @objectstack/spec minor meets "a kind takes at least minor on a package the diff moves". The other packages at patch or minor are within the rule; nothing is major.
  • Banner, FROM and TO rows, the one-line fix and the ADR-0087 marker (registered action-type-ask-ai-removed, ui-action-type-ask-ai-retired) are present and match the diff. Both registered ids exist in the tree.
  • Check Changeset was in_progress when read, so the level gate had not answered on this head. The judgment above is the reading, not the gate.
  • The changeset's @object-ui lists are short by two removals: see N3.

③ Boundary flags

  • open_questions: empty in the dev report. Nothing to answer.
  • out_of_scope_findings, three, each with a carrier (brightrule owner; release owner; 入口专题 C1s:技能文档与评测样例里的 ask_ai 删掉(受管 skills) #37857). Accepted as carried. The card's acceptance line "brightrule boots on the new version" is not shown by this PR; the card puts it before C1 releases, not before merge. Escalated to the seat as an open carrier.
  • security_findings: withheld in the dev report. The content was not readable from the card or the PR. Escalated to the seat: it must be read before landing.
  • Landing order: check:skill-examples stays red on this head until docs(skills): objectstack-ai no longer teaches an authored AI button on a record page #37937 is merged and main is merged in. docs(skills): objectstack-ai no longer teaches an authored AI button on a record page #37937 was open when read. Merging main moves the head, and this record does not cover the new head.
  • scripts/check-skill-identifier-liveness.mjs is outside the claimed file surface; the dev report says the seat accepted it. The re-point of the ### Action Types binding to ACTION_TYPE_VALUES is the smallest change that keeps Leg 2 reading the live members. Leg 1 will not red the stale ask_ai row in skills/objectstack-ui/SKILL.md, because the token still exists under packages/**; 入口专题 C1s:技能文档与评测样例里的 ask_ai 删掉(受管 skills) #37857 is the only thing holding that row to account.
  • SQL push-down: no new id materialisation and no new in-app join. The loader and the stored pass read the rows they already read.
  • Check-runs on the head, as read. Success: Auto Label, Check Documentation Links, Check PR Size, Dogfood Regression Gate, Flag docs affected by code changes, Governed Surface Queue Guard, PR-body guards (claim · duplicate · Part-of · single-writer path), Plan Test UI shards, Spec property liveness, filter. Skipped: 18.x upgrade harness (opt-in), Borrowed queue verdict, Dogfood Regression Gate (matrix shard), Dogfood Verify CLI, Packed-tarball smoke (opt-in), Queue verdict, Schedule gate, Temporal Conformance (live PG + MySQL), UI Published Artifacts. In progress, no verdict yet: Build Core, Build Docs, Build UI Deps, Check Changeset, Lint · CI, release & engine gates, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Lint · scoped · tooling self-tests, Live E2E UI, Plan Test Core shards, Type Check · consumer gates, Type Check · debt ledger, Type Check · source gates, Type Check · workspace. No test shard had reported.

④ Design judgment

The narrowing makes the spec's own refusal real; it takes no declared capability away at a consumer. ADR-0160 D7 on main (seventh amendment) retires the type by the maintainer's ruling, and the type was published only on 19.0.0-next.0. The refusal, the conversion's two doors, the D3 entry, the undefined answer of the stored seam and the skipped listing each match the text of D7 and points 29 to 31. Tried and held: an unnamed action deleted over sources while a reference survives (the string superset prevents it within one stack); a second conversion emptying a collection; an undefined item reaching a registry write; the identity read losing a row's object binding; the artifact window missing a prerelease build.

S1 (should-fix) — two stored-row readers outside the diff treat the seam's undefined as a served body, so a row that should be served is masked. D7.3 says no read returns the action and what carried it still loads.

  • packages/metadata-protocol/src/protocol-meta-item-reads.ts, the previewDrafts arm (about line 1085): for a draft row that is an ask_ai action, draftItem is undefined, the address test passes (exactQualifierItem hands undefined back) and the read returns item: undefined at once. It never reaches the active row or the registry, so a published action with a pending ask_ai draft reads as nothing on a preview read. The list read's draft arm was fixed in this PR (.filter), the by-name arm was not.
  • packages/metadata-protocol/src/protocol-meta-layered-reads.ts (lines 592, 731, then 637, 661 and 884): overlay is initialised to null and every later test is overlay !== null. An undefined overlay therefore counts as present: overlayScope is 'env', the row-less view expansion is skipped, and effective is undefined instead of code. A packaged action under a stored ask_ai row of the same name loses its effective layer on the editor read, while getMetaItem serves it. Line 943 already tests overlay !== undefined, which shows the two states were not meant to differ.
  • Fix: map undefined to "no row" at both sites (fall through in the preview arm; ?? null on the three layered assignments), with a test for each.

S2 (should-fix) — D7.3 charges this card to pin by test that the delete door still reaches such a row, and names that door as the metadata API's delete. The skipped reason sends the operator to DELETE /api/v1/meta/action/NAME. The pin in the diff is on DatabaseLoader.delete; the metadata API's delete is deleteMetaItem, which goes through SysMetadataRepository, and the protocol test's stub engine deletes nothing. By reading, that path never converts a body, so it should reach the row; nothing in the diff proves it, and it is the one exit these rows have. Add a deleteMetaItem case to protocol.stored-ask-ai-retired-row.test.ts.

N1 (nit) — the conversion's reportTodo call is unreachable in production. os migrate meta passes no context, and at rest keep is always false. A kept action is listed only by the D3 entry, which is what D7 asks; the PR body's "reported as a todo" overstates it. Prose fix, or leave.

N2 (nit) — the stored-row conversion warning ends "re-save it (Studio edit, save, or run os migrate meta --stored --apply)". Neither clears an ask_ai action row: the save refuses it and the pass skips it. D7.3 says the warning is the door's own notice, so this is accepted as written; a follow-up card may give whole-row removals their own tail.

N3 (nit) — the changeset does not name ActionRunner.bulkRefusal (@object-ui/core) or AiSurfaceState.focusServed (@object-ui/app-shell) among the removals. Both shipped only in the prerelease. Changeset prose.

N4 (nit) — applyMetaMigrationsToPackages runs the chain over each packages[i].manifest body alone, so the source guard cannot see a name held in the host stack or another body, and would delete that body's ask_ai action. ACTION_NAME_UNDEFINED treats a cross-package name the same way, so this is the tree's own blind spot. Accepted deviation.

Could not read: the withheld security findings; the check-runs still in progress; brightrule, cloud and hotcrm sources.

Implemented-by: claude/project-thread-vjrz36
Reviewed-by: session_01L9qibvMMgnKA797JY46H9i

VERDICT: PASS

… draft and no overlay

The preview-draft arm of the by-name read and the layered read's served,
orphan and draft layers took the stored seam's `undefined` (an ask_ai action
row, ADR-0160 D7) for a served body. Each now treats it as no row: the
preview read falls through to the active item, the layered read reports no
overlay and no pending draft. Pinned with the metadata API's delete reaching
such a row. The changeset names ActionRunner.bulkRefusal and
AiSurfaceState.focusServed among the removals.

Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 5b33bc3eaa91c0d0fbe89918d5eabd1b7219ab83
Local-runs: none
Scope: .changeset/37856-ask-ai-action-type-retired.md, packages/metadata-protocol/src/protocol-meta-item-reads.ts, packages/metadata-protocol/src/protocol-meta-layered-reads.ts, packages/metadata-protocol/src/protocol.stored-ask-ai-retired-row.test.ts + packages/spec/src/conversions/stored.ts (the seam's undefined answer these readers consume), packages/metadata-protocol/src/protocol-diff-delete-load.ts (deleteMetaItem, which the new case drives), docs/adr/0160-record-scoped-ai-inquiry.md (D7.3)

Delta review of a2dd88a68cbb2efa6145ad4b2cdf9100ba802e28..5b33bc3e (one commit, 4 files, +80/-24) against the record on a2dd88a6. Everything outside these four files is byte-identical to the head that record covers, and its judgments stand. Read: the delta diff, the changed functions in the tree at the new head, the card's comments (one new: a claim amendment naming the four build-forced files, no ruling), and the check-runs on the new head.

① Derived judgments

  • getMetaItem, previewDrafts arm: the draft row is converted first, and a draft the seam yields no item of clears draftRec, so the arm is skipped and the active read below answers. Right: it is what the list read's draft arm already does, and D7.3's "no read returns it" with "what carried it still loads".
  • getMetaItemLayered: the served overlay, the orphan overlay and the draft layer are each assigned only when the converted item is not undefined. With no item, overlay and overlayScope stay null, overlayRow and overlayBinding stay unset, draft stays the null that withDraft initialises, and effective falls to code. Right. A served row that yields no item now also lets the orphan lookup and the row-less view expansion run, as with no row. Right.
  • No accept-set and no public-surface change in the delta. Both edits are internal to two protocol read functions; no signature moved.
  • Tests: three new cases in protocol.stored-ask-ai-retired-row.test.ts. The preview case seeds a draft ask_ai row over a registry item and expects the registry item with no _draft stamp. The layered case seeds an active and a draft ask_ai row and expects overlay: null, overlayScope: null, draft: null. The delete case calls protocol.deleteMetaItem and expects the row gone from the stub table; the stub's delete now removes by where.id where it returned deleted: 0 before, so the case can fail. Right. The dev's ablation claim (reverting both source files reds exactly the first two) is consistent with the code: the delete case pins behaviour that held already. It was not re-run here, and no test shard had reported on this head.

② Semver level

  • Unchanged: same packages, same levels, same declaration lines, banner and ADR-0087 marker. The delta touches @objectstack/metadata-protocol only, which the changeset already moves at patch.
  • Check Changeset is success on this head, so the level gate has now answered.

③ Boundary flags

  • No new dev flag in the delta. The flags of the previous record stay with the seat, unchanged by this commit: the withheld security findings, brightrule's boot, and the landing order behind docs(skills): objectstack-ai no longer teaches an authored AI button on a record page #37937, which was still open and unmerged when read.
  • SQL push-down: the delta adds no query. Each reader converts a row it already read.
  • Check-runs on the head, as read. Success: Auto Label, Check Changeset, Check Documentation Links, Check PR Size, Dogfood Regression Gate, Flag docs affected by code changes, Governed Surface Queue Guard, PR-body guards (claim · duplicate · Part-of · single-writer path), Plan Test UI shards, Spec property liveness, filter. Skipped: 18.x upgrade harness (opt-in), Borrowed queue verdict, Dogfood Regression Gate (matrix shard), Dogfood Verify CLI, Packed-tarball smoke (opt-in), Queue verdict, Schedule gate, Temporal Conformance (live PG + MySQL), UI Published Artifacts. In progress, no verdict yet: Build Core, Build Docs, Build UI Deps, Lint · CI, release & engine gates, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Lint · scoped · tooling self-tests, Live E2E UI, Plan Test Core shards, Type Check · consumer gates, Type Check · debt ledger, Type Check · source gates, Type Check · workspace.

④ Design judgment

S1: closed
S2: closed
N3: closed

N1, N2 and N4 are left as the previous record graded them: nits, accepted as written or for a follow-up card. Nothing in the delta touches them.

No must-fix, no should-fix.

Tried on the delta and held: a draft row with no item beside an active stored row (the arm is skipped, the active arm reads the stored row); a served overlay with no item under a packaged action (effective is code); the layered draft at an exact address (the address test sits inside the guarded block, so it never sees undefined). One thing noted and not graded: with withVersion, overlayVersion is still read off the active row, so the layered read can answer a version token beside overlay: null for such a row. The token is the one a delete of that row would carry, and nothing reads it as proof of an overlay.

Could not read: the withheld security findings; the verdicts of the check-runs still in progress, the test shards among them.

Implemented-by: claude/project-thread-vjrz36
Reviewed-by: session_01L9qibvMMgnKA797JY46H9i

VERDICT: PASS

… row still pins a publish

With `withVersion`, the layered read answers the stored active row's token
beside `overlay: null`. Kept on purpose and pinned: Studio pins a publish to
that token, and a `null` would pin `If-None-Match: *`, which the row still
stored at the address refuses 409.

Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK
Co-authored-by: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data protocol:ui size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants